let a = function cc (s){
    function a(){

    }
    // prototype 原型对象
    a.prototype.name1 = "bbb";
    a.prototype.fun = function () {
        console.log(s)
    };
    // a.__proto__  是原型链接
    // a.cc=s

    // for(let b in a){
    //     console.log(a[b])
    // }
    // console.log(a.getOwnPropertyDescriptor())
    return a;
}(4);
// 闭包：内存，父级

let c = new a()
console.log(c.name);
console.log(c.name1);
console.log(a.cc)
console.log(c.fun())
console.log(c.hasOwnProperty('name1'));
console.log(c.hasOwnProperty('fun'));
for(let b in c){
    console.log(b)
}
